package com.ossjk.oa.accounting.mapper;

import java.util.Date;
import java.util.List;

import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import com.baomidou.mybatisplus.mapper.BaseMapper;
import com.baomidou.mybatisplus.mapper.Wrapper;
import com.baomidou.mybatisplus.plugins.Page;
import com.ossjk.oa.accounting.entity.CwCpttypes;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author chair
 * @since 2020-05-14
 */
public interface CwCpttypesMapper extends BaseMapper<CwCpttypes> {
	
	List selectVoPage(Page page, @Param("ew") Wrapper wrapper);
	
	@Update("update Cw_Cpttypes set endtime=#{endtime} where id=#{id}")
	int updateEndtime(@Param("endtime")Date endtime,@Param("id")String id);
	
	@Select("select * from cw_Cpttypes where endtime is null order by id")
	List<CwCpttypes> selectInuse();
	
}
